package test;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.InvalidPropertiesFormatException;
import java.util.Properties;

public class GetXML {
	public static void init(){
		
		Properties properties = new Properties();
		FileInputStream fi = null;
		try{
			fi = new FileInputStream("Test.xml");
			try {
				properties.loadFromXML(fi);
			} catch (InvalidPropertiesFormatException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}catch (FileNotFoundException e) {
			System.out.println("File Not Found!");
		}
		user.name = properties.getProperty("name");
		user.pwd = properties.getProperty("pwd");
	}
	public static class user{
		static String name;
		static String pwd;
		//GetXML.init();
		
	}
	public static void main(String[] args) {
		init();
		System.out.println(user.name+"  " + user.pwd);
	}
}
